import { Shop } from './shop.entity'
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'
// 商品
@Entity()
export class ShopGood {
  @PrimaryGeneratedColumn()
  id: number

  @Column()
  title: string

  @Column()
  thumb: string

  @Column()
  brand: string

  @Column()
  images: string

  @Column({
    comment: '售价'
  })
  price: string

  @Column({
    comment: '原价'
  })
  price_del: string

  @Column({
    comment: '商品简介'
  })
  tip: string

  @Column({
    comment: '商品详情'
  })
  description: string

  @Column()
  tag: string

  @ManyToOne(type => Shop, shop => shop.goods)
  shop: Shop
}
